#include <Windows.h>
#include <tchar.h>
#include "trace_class.h"

_SSL_BEGIN
_SSBASEL_BEGIN

trace_region::trace_region(const char *region_name)
: region_name_a_(region_name)
{
	region_name_w_ = NULL;
	if(region_name_a_ != NULL)
	{
		TraceVT_A("Enter %s", region_name_a_);
	}
}

trace_region::trace_region(const wchar_t *region_name)
	: region_name_w_(region_name)
{
	region_name_a_ = NULL;
	if(region_name_w_ != NULL)
	{
		TraceVT_W(L"Enter %s", region_name_w_);
	}
}

trace_region::~trace_region()
{
	if(region_name_a_ != NULL)
	{
		TraceVT_A("Leave %s", region_name_a_);
	}else if(region_name_w_ != NULL)
	{
		TraceVT_W(L"Leave %s", region_name_w_);
	}
}

_SSBASEL_END
_SSL_END
